package org.jsoncrypto;

import org.json.JSONObject;

abstract class JcLibEnc_NONAEAD extends JcLibEnc {
	JcLibInt mInt;
	protected JcLibEnc_NONAEAD(JSONObject header, String encStr) throws JcBaseException {
		super(header, encStr);
		String jweIntStr = header.optString("int");
		if (jweIntStr == null) {
			throw new JcBaseException("int is required if enc is non AEAD");
		}
		mInt = new JcLibInt(header);
	}
	public JcLibEnc_NONAEAD(String encodedJwtHeaderSegment,
			String encodedJwtKeySegment, String encodedJwtIvSegment, String encodedJwtCryptoSegment,
			String encodedJwtIntegritySegment) throws JcBaseException {
		super(encodedJwtHeaderSegment,
				encodedJwtKeySegment, encodedJwtIvSegment, encodedJwtCryptoSegment,
				encodedJwtIntegritySegment);
	}
	
}
